package org.wmq.shopmanager.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.wmq.shopmanager.mapper.ProductSpecMapper;
import org.wmq.shopmanager.service.ProductSpecService;
import org.wmq.shopmodel.Entity.product.ProductSpec;

@Service
@RequiredArgsConstructor
public class ProductSpecServiceImpl extends ServiceImpl<ProductSpecMapper, ProductSpec> implements ProductSpecService {
    private final ProductSpecMapper productSpecMapper;

    @Override
    public IPage<ProductSpec> getPageItem(Long pageNo, Long pageSize) {
        Page<ProductSpec> page = new Page<>(pageNo, pageSize);
        LambdaQueryWrapper<ProductSpec> queryWrapper = new LambdaQueryWrapper<>();
        return this.productSpecMapper.selectPage(page, queryWrapper);
    }
}
